package com.stk.triplecity;

import com.stk.triplecity.R;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Background {

	private int posX = 0;
	private int posY = 0;
	private Bitmap bg1 = null;
	private Bitmap bg2 = null;
	private static Background instance = null;
	
	
	public Background(Panel p, int w, int h) {
		super();
		bg1= Bitmap.createScaledBitmap(BitmapFactory.decodeResource(p.getResources(), R.drawable.background1), h, h, false);
		bg2= Bitmap.createScaledBitmap(BitmapFactory.decodeResource(p.getResources(), R.drawable.background2), h, h, false);
	}
	
	public static Background getInstance(Panel p, int w, int h){
		if (instance == null){
			instance = new Background(p, w, h);
		}
		return instance;
	}


	public int getPosX() {
		return posX;
	}


	public void setPosX(int posX) {
		this.posX = posX;
	}


	public int getPosY() {
		return posY;
	}


	public void setPosY(int posY) {
		this.posY = posY;
	}


	public Bitmap getBg1() {
		return bg1;
	}


	public Bitmap getBg2() {
		return bg2;
	}
	
	
}
